import Mock from "mockjs";
const mock = [
  {
    url: "/api/userInfo",
    method: "post",
    response: () => {
      return {
        status: 0,
        message: "success",
        data: {
          name: Mock.Random.cname(),
          age: Mock.Random.integer(1, 100),
          sex: Mock.Random.integer(0, 1),
          address: Mock.Random.county(true),
          email: Mock.Random.email(),
          phone: Mock.Random.integer(10000000000, 99999999999),
        },
      };
    },
  },
  {
    url: "/api/getMenuList",
    method: "get",
    response: () => {
      return {
        status: 0,
        message: "success",
        data: [
          {
            name: "子应用1",
            icon: "menu",
            url: "/sub-app1",
            type: "menu",
            path: "//localhost:4000",
            children: [
              {
                name: "首页",
                icon: null,
                type: "page",
                url: "/sub-app1/home",
                path: "HomeView",
              },
              {
                name: "关于",
                icon: null,
                type: "page",
                url: "/sub-app1/about",
                path: "AboutView",
              },
            ],
          },
          {
            name: "子应用2",
            icon: "menu",
            type: "menu",
            url: "/sub-app2",
            path: "//localhost:5000",
            children: [
              {
                name: "首页",
                icon: null,
                type: "page",
                url: "/sub-app2/home",
                path: "HomeView",
              },
              {
                name: "关于",
                icon: null,
                type: "page",
                url: "/sub-app2/about",
                path: "AboutView",
              },
            ],
          },
        ],
      };
    },
  },
];

export default mock;
